define([],function(){
    var tpl = {};

    tpl.courseLibirayList = function(){
        var html = '';
        html += courseLibirayList();
        return html;
    };
    tpl.addCourseLibirayForm = function(){
        var html = '';
        html += addCourseLibirayForm();
        return html;
    }

    var courseLibirayList = function(){
        return  '<script id="nutrition_courseLibrary_List" type="text/html">'+
                '   <div class="course-box add-course" id="addCourseLibiray">'+
                '       <i class="fa fa-plus" aria-hidden="true"></i>'+
                '   </div>'+
                '   {{each list as value i}}'+
                '   <div class="course-box" libraryId="{{value.libraryId}}">'+
                '       <div class="course-info">'+
                '           <div class="course-name">'+
                '               <i class="fa fa-folder-o" aria-hidden="true"></i>'+
                '               {{value.libraryName}}'+
                '           </div>'+
                '           <div class="course-type">'+
                '               <span>{{value.createName}}</span>'+
                '               <i class="fa fa-circle" aria-hidden="true"></i>'+
                '               <span>{{value.createTime}}</span>'+
                '           </div>'+
                '       </div>'+
                '       <div class="course-operation">'+
                '           <span class="setCourseLibrary">'+
                '               <i class="fa fa-cog" aria-hidden="true"></i><br>'+
                '               设置'+
                '           </span>'+
                '       </div>'+
                '   </div>'+
                '   {{/each}}'+
                '</script>';
    }
    var addCourseLibirayForm = function(){
        return  '<script id="nutrition_courseLibrary_addForm" type="text/html">'+
                '   <form class="form-horizontal">'+
                '       <div class="form-group">'+
                '           <label class="col-sm-3 control-label"><i class="not-null">*</i>疗程库名称</label>'+
                '           <div class="col-sm-8">'+
                '               <input type="text" name="libraryName" class="form-control" value="{{libraryName}}" placeholder="请输入疗程库名称">'+
                '           </div>'+
                '       </div>'+
                '       <div class="form-group">'+
                '           <label class="col-sm-3 control-label">备注</label>'+
                '           <div class="col-sm-8">'+
                '               <input type="text" name="remark" class="form-control" value="{{remark}}" placeholder="请输入备注">'+
                '           </div>'+
                '       </div>'+
                '       <div class="form-group">'+
                '           <div class="col-sm-offset-3 col-sm-8">'+
                '               <div id="saveCourseLibirayBtn" class="btn btn-info" libraryId="{{libraryId}}">添加</div>'+
                '           </div>'+
                '       </div>'+
                '   </form>'+
                '</script>';
    }

    return tpl;
});